/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   Module Name          : com.yaodian100.ec.common.web.AbstractAction
   Module Description   :

   Date Created      : 2009/12/16
   Original Author   : jeff.ma
   Team              : yaodian100
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   MODIFICATION HISTORY
   ------------------------------------------------------------------------------
   Date Modified       Modified by       Comments
   ------------------------------------------------------------------------------
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
package com.yaodian100.ec.common.web;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.Preparable;
import com.yaodian100.core.common.entity.SimplePager;

/**
 * @author jeff.ma
 * 
 */
public abstract class AbstractAction extends ActionSupport implements Preparable {

	/** serialVersionUID */
	private static final long serialVersionUID = 8498728324270389066L;

	protected Logger logger = LoggerFactory.getLogger(getClass());
	private SimplePager pager;

	/** default constructor */
	public AbstractAction() {
	}

	/**
	 * @return the pager
	 */
	public SimplePager getPager() {
		if (pager == null) {
			pager = new SimplePager();
		}
		return pager;
	}

	/**
	 * @param pager the pager to set
	 */
	public void setPager(SimplePager pager) {
		this.pager = pager;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.opensymphony.xwork2.Preparable#prepare()
	 */

	public void prepare() throws Exception {
		clearErrorsAndMessages();
	}

}
